package com.it.mapping;

import com.it.Bean.Admin;

import java.sql.ResultSet;
import java.sql.SQLException;

public class AdminMapping implements EntityMapping{
    @Override
    public Admin mapping(ResultSet rs) throws SQLException {

        Admin admin = new Admin();
        admin.setId(rs.getInt("ID"));
        admin.setUsename(rs.getString("USERNAME"));
        admin.setPassword(rs.getString("PASSWORD"));
        admin.setAge(rs.getInt("AGE"));
        admin.setShcool(rs.getString("SCHOOL"));
        return admin;
    }
}
